package com.github.xuchen93.forlaozeng.opreate_2;

import java.util.Scanner;

/**
 * @author xuchen.wang
 */
public class Subject_3 {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println("请输入三角形的第一条边");
		int a = scanner.nextInt();
		System.out.println("请输入三角形的第二条边");
		int b = scanner.nextInt();
		System.out.println("请输入三角形的第三条边");
		int c = scanner.nextInt();
		if (a+b<=c || a+c<=b || b+c<=a){
			System.out.println("不能构成三角形");
		} else {
			double s = (a+b+c) *0.5;
			double area = Math.sqrt(s * (s - a) * (s - b) * (s - c));
			System.out.printf("面积为：%s%n",area);
		}
	}
}
